{extend name="base" /}
{block name="css"}
{css href="__CSS__/app.css" /}
{/block}
{block name="body"}
<!-- 主要内容 开始 -->
<div class="weui-tab__bd-item">
    <header class="weui-navBar weui-navBar-fixed">
        <a href="javascript:history.go(-1);" class="weui-navBar-item">
            <i class="icon iconfont icon-fanhui f-white"></i>
        </a>
        <div class="weui-center">
            <span class="weui-center-title f-white">下载客户端</span>
        </div>
        <a href="javascript:;" class="weui-navBar-item">
        </a>
    </header>
    <div class="weui-tab__panel">
        <div class="logo">
            <img src="__IMG__/logo.png" alt="{$config.title|default=''}">
        </div>
        <p class="demos-title f-white">{$config.title|default=''}</p>
    </div>
    <div class="down-load tc">
        <a href="javascript:;" class="qrcodes open-popup" data-target="#qrcode"><span class="inner"><em class="qrcode fl"></em>二维码</span></a>
        <a href="javascript:;" class="show open-ios"><span class="inner"><em class="ios fl"></em>IOS下载</span></a>
        <a href="javascript:;" class="show open-android"><span class="inner"><em class="android fl"></em>安卓下载</span></a>
    </div>
</div>
<!-- 主要内容 结束 -->
<!--弹出二维码-->
<div id="qrcode" class="weui-popup__container popup-bottom">
  <div class="weui-popup__overlay"></div>
  <div class="weui-popup__modal">
    <div class="weui-popup">
      <div class='demos-header'>
        <h1 class="demos-title f-violet">{$config.title|default=''}</h1>
      </div>
      <div class="myqrcode"></div>
      <p class="weui-msg__desc">扫一扫上面的二维码图案，下载客户端</p>
    </div>
  </div>
</div>
<!--弹出二维码-->
{/block}
{block name="js"}
{js href="__JS__/jquery.qrcode.min.js" /}
<script type="text/javascript">
  $(function(){
    $('.myqrcode').qrcode({
      width: 180,
      height: 180,
      correctLevel: 0,
      text: '{$Request.domain}/register/code/{$info.share_code}.html'
    });
    $(".show").click(function(){
    	var u = navigator.userAgent;
      var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
      if(isiOS){
      	if(is_weixin()){
        	$.toast('微信内打开','text');
        }
        location.href="ios.html"
      }else{
        if(is_weixin()){
          $.toast('微信内打开','text');
        }
        location.href="down.php"
      }
    });
  });
</script>
{/block}